<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ProductOrder extends Model
{
    protected $table = 'product_order';
    //设置主键值
    protected $primaryKey = 'id';
    public $timestamps = false;

    protected $guarded = [];

    public function product_list()
    {
        return $this->hasMany(ProductList::class, 'order_id', 'id');
    }

    public function shipping_address()
    {
        return $this->belongsTo(ShippingAddress::class, 'addressid');
    }
}
